import cyce.dfs.fileChooser.*;
import java.io.*;
import javax.swing.*;

public class FileChooserTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		String xml = "";
		try {
			BufferedReader reader = new BufferedReader(new FileReader("files.xml"));
			String line = reader.readLine();
			while (line != null) {
				xml += line;
				line = reader.readLine();
			}
		}
		catch (FileNotFoundException fnfe) {
			fnfe.printStackTrace();
			return;
		}
		catch (IOException ioe) {
			ioe.printStackTrace();
			return;
		}
		
		FileModel model = new FileModel(xml);
		FileChooser chooser = new FileChooser(model);
		
		JFrame frame = new JFrame("File Chooser Test");
		frame.getContentPane().add(chooser);
		
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	    frame.pack();
	    frame.setVisible(true);
	}

}
